<template>
  <div class="home">
    <!-- 英雄区域 -->
    <section class="hero">
      <a-row justify="center">
        <a-col :xs="24" :lg="20">
          <h1>探索校园的<span>无限可能</span>，开启你的冒险旅程</h1>
          <p>校园冒险者公会是一个连接学生、公会和佣兵团的创新平台。在这里，你可以接受挑战、组建团队、完成任务并赢得荣誉，让校园生活充满精彩冒险。</p>

          <div class="hero-btns">
            <a-button type="primary" size="large" class="btn-primary">
              <template #icon>
                <i class="fas fa-play"></i>
              </template>
              开始冒险
            </a-button>
            <a-button size="large" class="btn-secondary">
              <template #icon>
                <i class="fas fa-search"></i>
              </template>
              探索任务
            </a-button>
          </div>
        </a-col>
      </a-row>
    </section>

    <!-- 特性卡片区域 -->
    <section class="features">
      <div class="section-header">
        <h2>公会的核心特性</h2>
        <p>我们提供独特的功能和体验，让每位冒险者都能找到属于自己的道路</p>
      </div>

      <a-row :gutter="30">
        <a-col :xs="24" :md="8" v-for="feature in features" :key="feature.id">
          <a-card class="feature-card" :bordered="true">
            <div class="card-icon">
              <i :class="feature.icon"></i>
            </div>
            <h3 class="card-title">{{ feature.title }}</h3>
            <p class="card-desc">{{ feature.description }}</p>
            <div class="card-stats">
              <a-tag class="stat" v-for="stat in feature.stats" :key="stat">
                <i :class="stat.icon"></i> {{ stat.text }}
              </a-tag>
            </div>
          </a-card>
        </a-col>
      </a-row>
    </section>
  </div>
</template>

<script>
import { defineComponent, ref } from 'vue'

export default defineComponent({
  name: 'Home',
  setup() {
    const features = ref([
      {
        id: 1,
        icon: 'fas fa-quest',
        title: '多样化任务系统',
        description: '从个人挑战到团队任务，从学术研究到校园活动，丰富的任务类型满足不同冒险者的需求。',
        stats: [
          { icon: 'fas fa-tasks', text: '320+ 任务' },
          { icon: 'fas fa-users', text: '团队协作' }
        ]
      },
      {
        id: 2,
        icon: 'fas fa-users',
        title: '公会与佣兵团',
        description: '加入公会获得支持，或组建佣兵团接受挑战。团队协作带来更多机会和更丰富的奖励。',
        stats: [
          { icon: 'fas fa-gem', text: '45+ 公会' },
          { icon: 'fas fa-shield-alt', text: '120+ 佣兵团' }
        ]
      },
      {
        id: 3,
        icon: 'fas fa-trophy',
        title: '成就与荣誉',
        description: '完成任务获得积分，提升等级，解锁独特成就。在排行榜上展示你的冒险者实力。',
        stats: [
          { icon: 'fas fa-star', text: '成就系统' },
          { icon: 'fas fa-medal', text: '排行榜' }
        ]
      }
    ])

    return {
      features
    }
  }
})
</script>

<style scoped>
.hero {
  padding: 80px 0 120px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  font-size: 4.5rem;
  line-height: 1.1;
  max-width: 900px;
  margin-bottom: 25px;
  background: linear-gradient(to right, #ffffff, #d4d4d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 span {
  background: linear-gradient(to right, #d4af37, #f9e076);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.3rem;
  max-width: 700px;
  margin-bottom: 40px;
  color: #a1a8b8;
  line-height: 1.6;
}

.hero-btns {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #b8972e 100%);
  color: white;
  box-shadow: 0 4px 25px rgba(212, 175, 55, 0.4);
  border: none;
  padding: 16px 35px;
  height: auto;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px rgba(212, 175, 55, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f0f4f8;
  backdrop-filter: blur(10px);
  padding: 16px 35px;
  height: auto;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #d4af37;
}

.features {
  padding: 50px 0 100px;
}

.section-header {
  text-align: center;
  margin-bottom: 70px;
}

.section-header h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 2.8rem;
  margin-bottom: 15px;
  background: linear-gradient(to right, #ffffff, #d4d4d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-header p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  color: #a1a8b8;
  line-height: 1.6;
}

.feature-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px 30px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #d4af37, transparent);
  opacity: 0;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: rgba(212, 175, 55, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card :deep(.ant-card-body) {
  padding: 0;
}

.card-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(42, 82, 152, 0.1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-icon i {
  font-size: 30px;
  color: #d4af37;
}

.card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: white;
}

.card-desc {
  color: #a1a8b8;
  line-height: 1.7;
  margin-bottom: 25px;
}

.card-stats {
  display: flex;
  gap: 15px;
}

.stat {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 14px;
  color: #a1a8b8;
  border: none;
}

.stat i {
  color: #d4af37;
  margin-right: 5px;
}
</style>